package com.ecoolex.hotel.saas.enums;

import com.ecoolex.framework.common.EnumInterface;
import com.ecoolex.framework.common.util.Check;

public enum PresaleCouponOrderAfterSalesStatus implements EnumInterface<PresaleCouponOrderAfterSalesStatus, Integer> {
	WAIT(1, "待处理"),
	SUCCESS(10,"售后成功"),
	CLOSE(11,"售后关闭");

	private int real;

	private String describe;

	private PresaleCouponOrderAfterSalesStatus(int real, String describe) {
		this.real = real;
		this.describe = describe;
	}

	@Override
	public Integer real() {
		return real;
	}

	@Override
	public String describe() {
		return describe;
	}

	public static PresaleCouponOrderAfterSalesStatus realValueOf(Integer real) {
		if (Check.notNull(real)) {
			for (PresaleCouponOrderAfterSalesStatus v : values()) {
				if (v.real().equals(real)) {
					return v;
				}
			}
		}
		return null;
	}
	
	public static Boolean canDealWith(Integer status) {
		return WAIT.equal(status);
	}
	
	public static Boolean canDelete(Integer status) {
		return SUCCESS.equal(status) || CLOSE.equal(status);
	}
}
